package mdm.led.entity;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.List;

import mdm.led.common.AbstractBean;

public class Role extends AbstractBean {

    /**
     * 
     */
    private static final long serialVersionUID = 5236206219573324995L;

    private Integer cRoleId;

    private String cRoleName;

    private String createTime;

    private String updateTime;

    private String remark;

    private Short state;   //1为启用  2为删除

    private List<RolePermission> rolepermissionlist;
    
    private String startDate;
    
    private String endDate;
    
    

    public String getStartDate() {
        return startDate;
    }

    public void setStartDate(String startDate) {
        this.startDate = startDate;
    }

    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    public List<RolePermission> getRolepermissionlist() {
        return rolepermissionlist;
    }

    public void setRolepermissionlist(List<RolePermission> rolepermissionlist) {
        this.rolepermissionlist = rolepermissionlist;
    }

    public Integer getcRoleId() {
        return cRoleId;
    }

    public void setcRoleId(Integer cRoleId) {
        this.cRoleId = cRoleId;
    }

    public String getcRoleName() {
        return cRoleName;
    }

    public void setcRoleName(String cRoleName) {
        this.cRoleName = cRoleName;
    }

    public String getCreateTime() {
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        if(!(createTime == null || createTime.equals(""))) {
        	try {
    			return simpleDateFormat.format(simpleDateFormat.parse(createTime));
    		} catch (ParseException e) {
    			// TODO Auto-generated catch block
    			e.printStackTrace();
    		}
        }
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateTime() {
		SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		if(!(updateTime == null || updateTime.equals(""))) {
			try {
				return simpleDateFormat.format(simpleDateFormat.parse(updateTime));
			} catch (ParseException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Short getState() {
        return state;
    }

    public void setState(Short state) {
        this.state = state;
    }

}